using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace FormatValue
{
	/// <summary>
	/// Summary description for Form1.
	/// </summary>
	public class Form1 : System.Windows.Forms.Form
	{
		private System.Windows.Forms.TextBox txEntry;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Button btEnter;
		private System.Windows.Forms.ListBox lsTimes;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		public Form1()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if (components != null) 
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
            this.txEntry = new System.Windows.Forms.TextBox();
            this.label1 = new System.Windows.Forms.Label();
            this.btEnter = new System.Windows.Forms.Button();
            this.lsTimes = new System.Windows.Forms.ListBox();
            this.SuspendLayout();
            // 
            // txEntry
            // 
            this.txEntry.Location = new System.Drawing.Point(270, 69);
            this.txEntry.Name = "txEntry";
            this.txEntry.Size = new System.Drawing.Size(271, 35);
            this.txEntry.TabIndex = 0;
            // 
            // label1
            // 
            this.label1.Location = new System.Drawing.Point(21, 69);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(208, 52);
            this.label1.TabIndex = 1;
            this.label1.Text = "Enter time";
            // 
            // btEnter
            // 
            this.btEnter.Location = new System.Drawing.Point(312, 155);
            this.btEnter.Name = "btEnter";
            this.btEnter.Size = new System.Drawing.Size(146, 52);
            this.btEnter.TabIndex = 2;
            this.btEnter.Text = "Enter";
            this.btEnter.Click += new System.EventHandler(this.btEnter_Click);
            // 
            // lsTimes
            // 
            this.lsTimes.ItemHeight = 24;
            this.lsTimes.Location = new System.Drawing.Point(125, 258);
            this.lsTimes.Name = "lsTimes";
            this.lsTimes.Size = new System.Drawing.Size(499, 148);
            this.lsTimes.TabIndex = 3;
            // 
            // Form1
            // 
            this.AutoScaleBaseSize = new System.Drawing.Size(13, 28);
            this.ClientSize = new System.Drawing.Size(687, 468);
            this.Controls.Add(this.lsTimes);
            this.Controls.Add(this.btEnter);
            this.Controls.Add(this.label1);
            this.Controls.Add(this.txEntry);
            this.Name = "Form1";
            this.Text = "Format and value";
            this.ResumeLayout(false);
            this.PerformLayout();

		}
		#endregion

		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		static void Main() 
		{
			Application.Run(new Form1());
		}

		private void btEnter_Click(object sender, System.EventArgs e) {
			FormatTime fmt = new FormatTime (txEntry.Text );
			lsTimes.Items.Add (fmt.getTime() );
		}
	}
}
